A path contour is defined by a series of geometric points. However, a path contour can contain off-curve control points as well as on-curve points; therefore, a path contour can contain curves as well as straight lines. A path shape may include any number of path contours.
Note
A single path contour can have between 0 and 32,767 geometric points. The geometry of a path shape can between 0 and 32,767 contours. The total size of a path geometry may not exceed 2,147,483,647 bytes.
Every path contains an array of control bits that specify which geometric points are on curve and which geometric points are off curve. QuickDraw GX connects two consecutive on-curve points with a straight line. If two on-curve points have an off-curve point between them, QuickDraw GX connects the two on-curve points with a quadratic Bezier curve, using the geometric point between them as the off-curve control point.
Quadratic Bezier curves have the following characteristics:
QuickDraw GX allows a path to have two or more consecutive off-curve control points. In this case, each pair of consecutive off-curve points implies an on-curve point midway between them, as represented by the small hollow circle in Figure 9 .
Figure 9 A path with two consecutive off-curve points
Path shapes may have any shape fill--including open-frame shape fill. However, a path may not have the open-frame shape fill if the first point or the last point of any path contour is an off-curve point.
If the contours of a path shape cross over one another, or if a path shape contains contours that lie within other contours, the even-odd shape fill and the winding shape fill may fill the path shape differently, as shown in Figure 10 .
Figure 10 A path shape filled with the even-odd and winding shape fills
Contour direction affects how QuickDraw GX fills a path when the path has the winding shape fill. In the example in Figure 10 , if the inner contour has the opposite contour direction from the outer contour, the winding shape fill works in the same manner as the even-odd shape fill.
When you create a new path shape, QuickDraw GX makes a copy of the default path shape. The default path shape has these properties:
You may change the properties of the default path shape. However, when creating a new path shape, QuickDraw GX always initializes the owner count to 1 and the geometry to 0 contours with 0 points, even if you have specified other values for the default paths shape.
For examples of creating and drawing path shapes without stylistic variations, see "Creating and Drawing Paths" .
| Previous | Chapter Contents | Chapter Top | Next |